apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"


react {

}


def enableProguardInReleaseBuilds = false

def jscFlavor = 'org.webkit:android-jsc:+'

android {
    ndkVersion rootProject.ext.ndkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    compileSdk rootProject.ext.compileSdkVersion

    namespace "com.reactsdk"
    defaultConfig {
        applicationId "com.reactsdk"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
}

dependencies {
    // The version of react-native is set by the React Native Gradle Plugin
    implementation("com.facebook.react:react-android")
    implementation("com.facebook.react:flipper-integration")

    if (hermesEnabled.toBoolean()) {
        implementation("com.facebook.react:hermes-android")
    } else {
        implementation jscFlavor
    }

    // SID зависимости
    implementation("io.github.sberid:SberIdSDK:3.5.1")

    //Если использовать зависимость ниже, то закомментить всё выше.
//    implementation files('libs/SberIdSDK-debug.aar')
//
//    //region Dependencies for ClickStream in SberIdSDK.aar
//    implementation("com.squareup.okhttp3:okhttp:4.11.0") // min 4.6.0
//    implementation("androidx.annotation:annotation:1.6.0")
//    implementation("androidx.core:core:1.10.1")
//    def jacksonVer = "2.13.1"
//    implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVer")
//    implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVer")
//    implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVer")
//    implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVer")
//    //end region
//
//    //region Dependencies for Yandex metrics in SberIdSDK.aar
//    implementation "com.yandex.android:mobmetricalib:5.0.0"
//    //end region
//
//    //region Dependencies for SberId
//    implementation "androidx.browser:browser:1.5.0"
//    implementation "com.yandex.android:mobmetricalib:5.0.0"
//    //end region
//    def kotlin_version = '1.8.22'
//    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//    implementation 'androidx.appcompat:appcompat:1.6.1'
//    implementation 'androidx.core:core-ktx:1.10.1'
//    implementation "androidx.cardview:cardview:1.0.0"
//    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
//    implementation 'com.google.android.material:material:1.9.0'
//    testImplementation 'junit:junit:4.13.2'
//    androidTestImplementation 'androidx.test:runner:1.5.2'
//    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.0-alpha01'
//    androidTestImplementation 'com.kaspersky.android-components:kaspresso:1.5.1'
//    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
//    androidTestImplementation 'androidx.test:rules:1.6.0-alpha01'
//    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
//    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.1'
//
//    //NAVIGATION
//    def nav_version = "2.6.0"
//
//    // Java language implementation
//    implementation "androidx.navigation:navigation-fragment:$nav_version"
//    implementation "androidx.navigation:navigation-ui:$nav_version"
//
//    // Kotlin
//    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
//    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
//
//    // Feature module Support
//    implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
//
//    // Testing Navigation
//    androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
//
//    // Jetpack Compose Integration
//    implementation "androidx.navigation:navigation-compose:$nav_version"
//
//    //Encrypted features
//    implementation "androidx.security:security-crypto:1.1.0-alpha06"
//
//    def koin_version = "3.4.3"
//    implementation "io.insert-koin:koin-android:$koin_version"
//    implementation "io.insert-koin:koin-androidx-compose:3.4.6"
//
//    def coroutineVersion = "1.7.3"
//    def coilVersion = "2.4.0"
//    def composeActivity = "1.7.2"
//    def composeToolingUI = "1.4.3"
//    def composeMaterial3 = "1.1.1"
//    def composeViewModelLifecycle = "2.6.1"
//
//    //Compose
//    implementation ("androidx.activity:activity-compose:$composeActivity")
//    implementation ("androidx.compose.ui:ui-tooling-preview:$composeToolingUI")
//    implementation ("androidx.compose.material:material:$composeToolingUI")
//    implementation ("androidx.compose.material3:material3:$composeMaterial3")
//    implementation ("androidx.compose.material:material-icons-extended:$composeToolingUI")
//    implementation ("androidx.lifecycle:lifecycle-viewmodel-compose:$composeViewModelLifecycle")
//
//    debugImplementation ("androidx.compose.ui:ui-tooling:$composeToolingUI")
//
//    ////PICTIRES
//    implementation("io.coil-kt:coil-compose:$coilVersion")
//
//    //KTOR
//    def ktorVersion = "2.3.5"
//    implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
//    implementation "io.ktor:ktor-client-android:$ktorVersion"
//    implementation "io.ktor:ktor-client-serialization:$ktorVersion"
//    implementation "io.ktor:ktor-client-logging-jvm:$ktorVersion"
//    implementation "io.ktor:ktor-client-json-jvm:$ktorVersion"
//    implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
//    implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
//
//    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
//
//    implementation("com.google.code.gson:gson:2.10.1")
//    runtimeOnly("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
//    implementation ("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
